<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TrabalhodeSistemasOperacionais: Código-Fonte de controladorderecursos.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gerado por Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TrabalhodeSistemasOperacionais&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;Principal</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;de&#160;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Arquivos&#160;Membros</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>controladorderecursos.h</h1>  </div>
</div>
<div class="contents">
<a href="controladorderecursos_8h.html">Vá para a documentação deste arquivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CONTROLADORDERECURSOS_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CONTROLADORDERECURSOS_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;QObject&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;QMutex&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;QFile&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;QTextStream&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;QIODevice&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;QDebug&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="transacao_8h.html">transacao.h</a>&quot;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;QStringList&gt;</span>
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 
<a name="l00016"></a><a class="code" href="classControladorDeRecursos.html">00016</a> <span class="keyword">class </span><a class="code" href="classControladorDeRecursos.html">ControladorDeRecursos</a> : <span class="keyword">public</span> QObject
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018     Q_OBJECT
<a name="l00019"></a>00019 <span class="keyword">public</span>:
<a name="l00020"></a>00020     <span class="keyword">explicit</span> <a class="code" href="classControladorDeRecursos.html#a8d76930b4d8cd4e16bba71e500528318">ControladorDeRecursos</a>(QObject *parent = 0);
<a name="l00021"></a>00021 
<a name="l00024"></a>00024     <span class="keywordtype">bool</span> <a class="code" href="classControladorDeRecursos.html#abe41b51f7e7fa5e1b4b36d23c5609842">alocarRecursos</a>(<span class="keywordtype">int</span> agenciaAlfa,<span class="keywordtype">int</span> agenciaBeta);
<a name="l00027"></a>00027     <span class="keywordtype">bool</span> <a class="code" href="classControladorDeRecursos.html#af3373e5211cc5b0a50e9f028ca9f4feb">liberarRecursos</a>(<span class="keywordtype">int</span> agenciaAlfa,<span class="keywordtype">int</span> agenciaBeta);
<a name="l00028"></a>00028     <a class="code" href="classControladorDeRecursos.html#a11d70028f7a1d6b3322d3598431421c0">~ControladorDeRecursos</a>();
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="comment">//    bool efetuaTransacao(Transacao * transacao);</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 
<a name="l00036"></a><a class="code" href="classControladorDeRecursos.html#a07694a5a06d3c8759deea101e9a08351">00036</a>       QMutex <a class="code" href="classControladorDeRecursos.html#a07694a5a06d3c8759deea101e9a08351">mutexAlocarRecursos</a>;
<a name="l00037"></a><a class="code" href="classControladorDeRecursos.html#a8cc0863c9b846edbbe342630bc2a0370">00037</a>       QMutex <a class="code" href="classControladorDeRecursos.html#a8cc0863c9b846edbbe342630bc2a0370">mutexFilaPrioritaria</a>;
<a name="l00038"></a><a class="code" href="classControladorDeRecursos.html#a5b861cd49370779a335561291264b880">00038</a>       QMutex <a class="code" href="classControladorDeRecursos.html#a5b861cd49370779a335561291264b880">mutexFila</a>;
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 
<a name="l00043"></a><a class="code" href="classControladorDeRecursos.html#a1d032beae44e9cb096fd7f1976c8d99b">00043</a>         QMutex <a class="code" href="classControladorDeRecursos.html#a1d032beae44e9cb096fd7f1976c8d99b">vetorMutexLog</a>[4];
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 
<a name="l00048"></a><a class="code" href="classControladorDeRecursos.html#a7eac37c798d3c35f37db85ec6bca09ea">00048</a>         QMutex <a class="code" href="classControladorDeRecursos.html#a7eac37c798d3c35f37db85ec6bca09ea">vetorMutexClientes</a>[4];
<a name="l00049"></a>00049 
<a name="l00052"></a><a class="code" href="classControladorDeRecursos.html#a32c0509169515d3e5d3deb362a9b1bb6">00052</a>            QTextStream * <a class="code" href="classControladorDeRecursos.html#a32c0509169515d3e5d3deb362a9b1bb6">logDeOperacao</a>[4];
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 
<a name="l00057"></a><a class="code" href="classControladorDeRecursos.html#aee6d928b22bdedd746a17432f4359336">00057</a>            QTextStream * <a class="code" href="classControladorDeRecursos.html#aee6d928b22bdedd746a17432f4359336">streamClientes</a>[4];
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 
<a name="l00062"></a><a class="code" href="classControladorDeRecursos.html#a65293a2608bc1e50c215d628deb18a98">00062</a>           QFile * <a class="code" href="classControladorDeRecursos.html#a65293a2608bc1e50c215d628deb18a98">vetorFileLogDeOperacao</a>[4];
<a name="l00063"></a>00063 
<a name="l00066"></a><a class="code" href="classControladorDeRecursos.html#a51febea7f8427f4dcd7fd8e698a208fa">00066</a>          QFile * <a class="code" href="classControladorDeRecursos.html#a51febea7f8427f4dcd7fd8e698a208fa">vetorFileClientes</a>[4];
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 
<a name="l00075"></a><a class="code" href="classControladorDeRecursos.html#afcaacc18523b061e93a0176d45858a4c">00075</a>       <span class="keywordtype">bool</span> <a class="code" href="classControladorDeRecursos.html#afcaacc18523b061e93a0176d45858a4c">vetorRecursos</a>[4];
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 
<a name="l00080"></a>00080          <span class="keywordtype">bool</span> <a class="code" href="classControladorDeRecursos.html#a46995e6cecb18a8f99e439fb48b89365">localizaCliente</a>();
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 signals:
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 <span class="keyword">public</span> slots:
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 };
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 <span class="preprocessor">#endif // CONTROLADORDERECURSOS_H</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Gerado em Terça, 6 de Dezembro de 2011 01:44:55 para TrabalhodeSistemasOperacionais por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
